<@_content id=id>
    <#assign
        a=object
        parentId=a.parentId!''
        categoryId=a.categoryId!''
        modelId=a.modelId!''
        attribute=getContentAttribute(a.id)!{}
    />
</@_content>
<@_category id=categoryId!><#assign category=object/></@_category>
<@_model id=modelId!><#assign model=object/></@_model>
<div class="pageFormContent" layoutH="50">
    <#if model?has_content>
        <#assign fieldList=model.fieldList![]/>
        <@_content id=parentId>
            <dl class="nowrap">
                <dt><@t.page 'content.parent'/>:</dt>
                <dd>
                    ${(object.title)!}
                </dd>
            </dl>
        </@_content>
            <dl>
                <dt><@t.page 'category'/>:</dt>
                <dd>
                    ${(category.name)!}
                </dd>
            </dl>
            <dl>
                <dt><@t.page 'model'/>:</dt>
                <dd>
                    ${(model.name)!}
                </dd>
            </dl>
            <dl class="nowrap">
                <dt>${(model.fieldTextMap['title'])!}:</dt>
                <dd>
                    ${(a.copied?then('['+t.pageMessage('copied')+']',''))!}${(a.title)!}
                </dd>
            </dl>
            <dl>
                <dt><@t.page 'status'/>:</dt>
                <dd>
                    <@t.page 'status.content.'+(a.status)!/>
                </dd>
            </dl>
        <#if 1=a.status>
            <dl>
                <dt><@t.page 'inspector'/>:</dt>
                <dd>
                     <@_sysUser id=a.checkUserId>${(object.nickName)!}</@_sysUser>
                </dd>
            </dl>
        </#if>
            <dl class="nowrap">
                <dt><#if model.onlyUrl>${(model.fieldTextMap['url'])!}<#else><@t.page 'url'/></#if>:</dt>
                <dd>
                    <a href="${(a.url)!}" target="_blank">${(a.url)!}</a>
                </dd>
            </dl>
        <#if a?has_content&&a.copied>
            <dl>
                <dt>${(model.fieldTextMap['source'])!}:</dt>
                <dd>${(attribute.source)!}</dd>
            </dl>
            <dl>
                <dt>${(attribute.source)!}:</dt>
                <dd>
                    <a href="${(attribute.sourceUrl)!}" target="_blank">${(attribute.sourceUrl)!}</a>
                </dd>
            </dl>
        </#if>
        <#if fieldList?seq_contains('author')>
            <dl>
                <dt>${(model.fieldTextMap['author'])!}:</dt>
                <dd>${(a.author)!}</dd>
            </dl>
        </#if>
        <#if fieldList?seq_contains('editor')>
            <dl>
                <dt>${(model.fieldTextMap['editor'])!}:</dt>
                <dd>${(a.editor)!}</dd>
            </dl>
        </#if>
        <#if category?has_content && (a.tagIds)?has_content>
<#if category.tagTypeIds?has_content>
    <@_tagType ids=category.tagTypeIds>
        <#list map as k,tagType>
            <dl class="nowrap">
                <dt>${tagType.name}:</dt>
                <dd>
                    <@_tag ids=a.tagIds>
                        <#list map as j,tag>
                            <#if tag.typeId=k>
                                ${tag.name},
                            </#if>
                        </#list>
                    </@_tag>
                </dd>
            </dl>
        </#list>
    </@_tagType>
<#else>
            <dl class="nowrap">
                <dt>${(model.fieldTextMap['tag'])!}:</dt>
                <dd>
                    <@_tag ids=a.tagIds>
                        <#list map as j,tag>
                            ${tag.name}<#sep>,
                        </#list>
                    </@_tag>
                </dd>
            </dl>
</#if>
        </#if>
        <#if fieldList?seq_contains('description')>
            <dl class="nowrap">
                <dt>${(model.fieldTextMap['description'])!}:</dt>
                <dd>
                    ${(a.description)!}
                </dd>
            </dl>
        </#if>
            <dl>
                <dt><@t.page 'publish_date'/>:</dt>
                <dd>
                    ${(a.publishDate)!}
                </dd>
            </dl>
        <#if fieldList?seq_contains('cover')&&a.cover?has_content>
            <dl class="nowrap">
                <dt>${(model.fieldTextMap['cover'])!}:</dt>
                <dd>
                    <div class="thumbnail">
                        <img src="${(site.sitePath+a.cover)!}" style="max-width:200px;max-height:200px;"/>
                    </div>
                </dd>
            </dl>
        </#if>
        <#include "../include_page/extendData.html"/>
        <#if category?has_content&&category.extendId?has_content>
            <@_sysExtendFieldList extendId=category.extendId>
                <#assign
                    extendList=list![]
                    extendValue=attribute!{}
                />
                <@extendData 'categoryExtendDataList' extendList extendValue 'view'/>
            </@_sysExtendFieldList>
        </#if>
        <#if model?has_content>
            <#assign
                extendList=model.extendList![]
                extendValue=attribute!{}
            />
            <@extendData 'modelExtendDataList' extendList extendValue 'view'/>
        </#if>
        <#if a?has_content&&(a.hasImages||a.hasFiles)>
            <#if a.hasImages>
            <dl class="nowrap">
                <dt><@t.page 'image_list'/>:</dt>
                <dd>
            <@_contentFileList contentId=a.id fileTypes='image'>
                <#list page.list as file>
                    <div class="thumbnail">
                        <img src="${site.sitePath+(file.filePath)!}" style="max-width:200px;max-height:200px;"/>
                    </div>
                </#list>
            </@_contentFileList>
                </dd>
            </dl>
            </#if>
            <#if a.hasFiles>
                <dl class="nowrap">
                    <dt><@t.page 'attach_list'/>:</dt>
                    <dd>
                <@_contentFileList contentId=a.id fileTypes='video,audio,other'>
                    <#list page.list as file>
                        <a href="${site.sitePath+(file.filePath)!}" target="_blank">${(file.filePath)!}</a>
                    </#list>
                </@_contentFileList>
                    </dd>
                </dl>
            </#if>
        </#if>
        <#if fieldList?seq_contains('content')>
            <dl class="nowrap">
                <dt>${(model.fieldTextMap['content'])!}:</dt>
                <dd id="content">
                    ${(attribute.text?no_esc)!}
                </dd>
            </dl>
        </#if>
    </#if>
    <#if a?has_content>
        <@_contentRelatedList contentId=a.id>
            <#if page.totalCount gt 0>
            <dl class="nowrap">
                <dt><@t.page 'recommend_info'/>:</dt>
                <dd>
                    <#list page.list as a>
                        <a href="${(a.url)!}" target="_blank">${(a.title)!}</a>
                    </#list>
                </dd>
            </dl>
            </#if>
        </@_contentRelatedList>
        <@_commentList advanced=true contentId=a.id count=100>
            <#if page.totalCount gt 0>
            <fieldset>
                <legend><@t.page 'comment'/></legend>
                <#list page.list as a>
                    <@t.merge 'userIds' a.userId!/>
                    <@t.merge 'userIds' a.replyUserId!/>
                </#list>
                <@_sysUser ids=t.userIds!><#assign userMap=map!/></@_sysUser>
                <#list page.list as a>
                <dl class="nowrap">
                    <dt>${(userMap[a.userId?string].nickName)!}<#if a.replyUserId?has_content> <@t.page 'comment.reply'/> ${(userMap[a.replyUserId?string].nickName)!}</#if>:</dt>
                    <dd>
                        <div>${a.text!}</div>
                    </dd>
                </dl>
                </#list>
            </#if>
        </@_commentList>
    </#if>
</div>
<div class="formBar">
    <ul>
        <li><button type="button" class="button close"><@t.page 'button.close'/></button></li>
    </ul>
</div>